<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.lg.system.CTurnPage" />
<%@ include file="/jsp/jscommom.jsp"%>
<%@ include file="/jsp/admintop.jsp"%>
<%@ include file="/jsp/viewtop.jsp"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>用户管理列表</title>
		<link href="/css/login.css" rel="stylesheet" type="text/css" />
	</head>
	<script type="text/javascript">
function domethod(){
document.all.method.value="";
document.forms[0].submit();
}

function recommend(userId){
if(confirm("确定推荐该用户并打印推荐函吗?")){
url="/recommenduser/receipt.do?userId="+userId+"&positionId="+document.all.positionId.value;

window.open(url, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=490,height=320,left=0,top=0'); 
}
}
function edit(url){
window.open(url,"_blank");
}
function goto(url){
window.location.href(url);
}

 
 
</script>
	<%
		CTurnPage mPage = new CTurnPage();
		mPage = (CTurnPage) request.getAttribute("page");
	%>
	<body>
		<html:form action="/recommenduser/queryuser" method="post">
		<html:hidden property="method"/>
		<html:hidden property="positionId"/>
			<div align="center">
				<table width="97%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
					<tr>
						<td class="titlebg" colspan="4">
							用户管理
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							用户姓名
						</td>
						<td class="mtdtextleft">
							<html:text property="userName" styleClass="input1"></html:text>
						</td>

						<td class="mtdtitle1">
							学历
						</td>
						<td class="mtdtextleft">
							<html:select property="education" styleClass="input1">
								<html:option value="">请选择</html:option>
								<html:option value="初中">初中</html:option>
								<html:option value="高中">高中</html:option>
								<html:option value="中技">中技</html:option>
								<html:option value="中专">中专</html:option>
								<html:option value="大专">大专</html:option>
								<html:option value="本科">本科</html:option>
								<html:option value="硕士">硕士</html:option>
								<html:option value="博士">博士</html:option>
							</html:select>
						</td>
					</tr>

					<tr>
						

						<td class="mtdtitle1">
							用户编号

						</td>
						<td  class="mtdtextleft" colspan="3">
							<html:text property="userId" styleClass="input1"></html:text>
						</td>

					</tr>

					<tr>
						<td class="mtdtitle1" colspan="4">
							<input value="查询" type="button" class="tbutton"
								onclick="domethod()" />
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1" colspan="4">
							<table width="100%" align="center" cellpadding="0"
								cellspacing="1" class="line1">
								<tr>
									<td class="mtdtextleft" colspan="6">
										&nbsp;
									</td>
								</tr>

								<tr>
									<td class="titlebg" colspan="6">
										用户列表
									</td>
								</tr>

								<tr>
									<td class="mtdtitle1">
										编号
									</td>
									<td class="mtdtitle1">
										用户姓名
									</td>
									<td class="mtdtitle1">
										学历
									</td>
									<td class="mtdtitle1">
										地址
									</td>
									<td class="mtdtitle1">
								推荐状态
								</td>
								<td class="mtdtitle1">
								操作
								</td>
								</tr>

								<logic:empty name="page" property="sqlList">
									<tr>
										<td class="mtdtextcenterwrite" colspan="6">
											没有可显示的内容!

										</td>
									</tr>
								</logic:empty>
								<logic:notEmpty name="page" property="sqlList">
									<logic:iterate type="com.ibatis.po.user.TUserInfo"
										id="userList" name="page" property="sqlList" indexId="index">
										<%
										if ((index.intValue() + 1) % 2 == 0) {
										%>
										<tr style="cursor:hand"
											>
											<td class="mtdtextcenterblue">
												${userList.id }
											</td>
											<td class="mtdtextcenterblue">
												${userList.name }
											</td>
											<td class="mtdtextcenterblue">
												${userList.education}
											</td>
											<td class="mtdtextcenterblue">
												${userList.registeredAddress}
											</td>
											<td class="mtdtextcenterblue">
												<logic:equal value="0" property="rec" name="userList">未推荐</logic:equal>
												<logic:equal value="1" property="rec" name="userList">已推荐</logic:equal>
											</td>
											<td class="mtdtextcenterwrite">
											<input value="推荐"  type="button" class="tbutton"
								onclick="recommend('${userList.id }')"/>
											</td>
										</tr>
										<%
										} else {
										%>
										<tr style="cursor:hand"
											>
											<td class="mtdtextcenterwrite" >
												${userList.id }
											</td>
											<td class="mtdtextcenterwrite" >
												${userList.name }
											</td>
											<td class="mtdtextcenterwrite">
												${userList.education}

											</td>
											<td class="mtdtextcenterwrite">
												${userList.registeredAddress}
											</td>
											<td class="mtdtextcenterwrite">
												<logic:equal value="0" property="rec" name="userList">未推荐</logic:equal>
												<logic:equal value="1" property="rec" name="userList">已推荐</logic:equal>
											</td>
											<td class="mtdtextcenterwrite">
											<input value="推荐"  type="button" class="tbutton" 
											onclick="recommend('${userList.id }')"/>
											</td>
										</tr>
										<%
										}
										%>
									</logic:iterate>
								</logic:notEmpty>
								<tr>
									<td colspan="6" class="mtdtitle1">
										<table width='100%'>
											<tr>
												<td class="left">
													<%=mPage.getPageInfo()%>
												</td>
												<td class="right">
													<%=mPage.getTurnPageLink()%>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</html:form>
	</body>
</html>
